Optimal. Leaf size=55 \[ \frac{1}{6} \log \left (x^2+x+1\right ) (a+b-2 c)-\frac{1}{3} \log (1-x) (a+b+c)+\frac{(a-b) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{\sqrt{3}} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.112597, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3 \[ \frac{1}{6} \log \left (x^2+x+1\right ) (a+b-2 c)-\frac{1}{3} \log (1-x) (a+b+c)+\frac{(a-b) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x + c*x^2)/(1 - x^3),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 16.7158, size = 58, normalized size = 1.05 \[ \frac{\sqrt{3} \left (a - b\right ) \operatorname{atan}{\left (\sqrt{3} \left (\frac{2 x}{3} + \frac{1}{3}\right ) \right )}}{3} + \left (\frac{a}{6} + \frac{b}{6} - \frac{c}{3}\right ) \log{\left (x^{2} + x + 1 \right )} - \left (\frac{a}{3} + \frac{b}{3} + \frac{c}{3}\right ) \log{\left (- x + 1 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((c*x**2+b*x+a)/(-x**3+1),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0619036, size = 62, normalized size = 1.13 \[ \frac{1}{6} \left ((a+b) \log \left (x^2+x+1\right )-2 (a+b) \log (1-x)+2 \sqrt{3} (a-b) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )-2 c \log \left (1-x^3\right )\right ) \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x + c*x^2)/(1 - x^3),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.007, size = 87, normalized size = 1.6 \[{\frac{\ln \left ({x}^{2}+x+1 \right ) a}{6}}+{\frac{\ln \left ({x}^{2}+x+1 \right ) b}{6}}-{\frac{\ln \left ({x}^{2}+x+1 \right ) c}{3}}+{\frac{a\sqrt{3}}{3}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{\sqrt{3}b}{3}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{\ln \left ( -1+x \right ) c}{3}}-{\frac{\ln \left ( -1+x \right ) b}{3}}-{\frac{\ln \left ( -1+x \right ) a}{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((c*x^2+b*x+a)/(-x^3+1),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.55429, size = 63, normalized size = 1.15 \[ \frac{1}{3} \, \sqrt{3}{\left (a - b\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{6} \,{\left (a + b - 2 \, c\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{3} \,{\left (a + b + c\right )} \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(c*x^2 + b*x + a)/(x^3 - 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.252444, size = 73, normalized size = 1.33 \[ \frac{1}{18} \, \sqrt{3}{\left (\sqrt{3}{\left (a + b - 2 \, c\right )} \log \left (x^{2} + x + 1\right ) - 2 \, \sqrt{3}{\left (a + b + c\right )} \log \left (x - 1\right ) + 6 \,{\left (a - b\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(c*x^2 + b*x + a)/(x^3 - 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.26524, size = 323, normalized size = 5.87 \[ - \frac{\left (a + b + c\right ) \log{\left (x + \frac{a^{2} c - a^{2} \left (a + b + c\right ) - 2 a b^{2} + b c^{2} - 2 b c \left (a + b + c\right ) + b \left (a + b + c\right )^{2}}{a^{3} - b^{3}} \right )}}{3} - \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} - \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) \log{\left (x + \frac{a^{2} c - 3 a^{2} \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} - \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) - 2 a b^{2} + b c^{2} - 6 b c \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} - \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) + 9 b \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} - \frac{\sqrt{3} i \left (a - b\right )}{6}\right )^{2}}{a^{3} - b^{3}} \right )} - \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} + \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) \log{\left (x + \frac{a^{2} c - 3 a^{2} \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} + \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) - 2 a b^{2} + b c^{2} - 6 b c \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} + \frac{\sqrt{3} i \left (a - b\right )}{6}\right ) + 9 b \left (- \frac{a}{6} - \frac{b}{6} + \frac{c}{3} + \frac{\sqrt{3} i \left (a - b\right )}{6}\right )^{2}}{a^{3} - b^{3}} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((c*x**2+b*x+a)/(-x**3+1),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.218793, size = 70, normalized size = 1.27 \[ \frac{1}{3} \,{\left (\sqrt{3} a - \sqrt{3} b\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{6} \,{\left (a + b - 2 \, c\right )}{\rm ln}\left (x^{2} + x + 1\right ) - \frac{1}{3} \,{\left (a + b + c\right )}{\rm ln}\left ({\left | x - 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(c*x^2 + b*x + a)/(x^3 - 1),x, algorithm="giac")
[Out]